package com.hns.can.master.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.hns.can.common.aop.orgTree.LeftOrgAnnotation;
import com.hns.can.master.entity.BaseLineTrackRelEntity;
import com.hns.can.master.vo.LineTrackRelParamsVo;
import com.hns.frame.service.CommonService;
import com.hns.tool.pub.PubUtil;

/**
 * 线路轨迹service
 * @author:zhangzq
 * @email:
 * @version Revision 2.0.0
 */
@Service
public class LineTrackRelService extends CommonService {

	/**
	 * 获取上行线路轨迹
	 * @param vo
	 * @return
	 * @throws Exception
	 * @author:zhangzq
	 * @email:
	 */
    @SuppressWarnings("unchecked")
	@LeftOrgAnnotation()
    @Transactional
    public List<BaseLineTrackRelEntity> getLineTrackRelUp(LineTrackRelParamsVo vo) throws Exception {
    	vo.setUpDn("1");
        List<BaseLineTrackRelEntity> list = PubUtil.convertListMapToObject(this.sqlMapDao.selectList("baseLineTrackInfo.getBaseLineTrackInfoList", vo), BaseLineTrackRelEntity.class);
        return list;
    }
    
    /**
     * 获取下行线路轨迹
     * @param vo
     * @return
     * @throws Exception
     * @author:zhangzq
     * @email:
     */
    @SuppressWarnings("unchecked")
	@LeftOrgAnnotation()
    @Transactional
    public List<BaseLineTrackRelEntity> getLineTrackRelDown(LineTrackRelParamsVo vo) throws Exception {
    	vo.setUpDn("0");
        List<BaseLineTrackRelEntity> list = PubUtil.convertListMapToObject(this.sqlMapDao.selectList("baseLineTrackInfo.getBaseLineTrackInfoList", vo), BaseLineTrackRelEntity.class);
        return list;
    }
}
